<template>
  <div>
    <web-view :src="path"></web-view>
  </div>
</template>
<script>

export default {
  components: {
  },
  data () {
    return {
      // path: 'https://www.rrjiaoyi.com/fm'
      path: ''
    }
  },
  methods: {
  },
  // onLoad(options){
  //   console.log(options)
  // },
  created () {
    // 调用应用实例的方法获取全局数据
    // this.getUserInfo()
  },
  mounted () {
    this.path = decodeURIComponent(this.$root.$mp.query.path)
    // console.log(this.path)
  },
  onShareAppMessage () {
    if (this.path == 'https://www.rrjiaoyi.com/games/jianren/') {
      return {
        // title: `${JSON.parse(wx.getStorageSync('art')).title}`,
        title: `${wx.getStorageSync('userinfo').nickName}`,
        path: `/pages/news/main?sharepath=games`,
        imageUrl: 'https://www.rrjiaoyi.com/app/games/jianren.png'
      }
    } else if (this.path == 'https://www.rrjiaoyi.com/games/zuiqiangyanli/') {
      return {
        // title: `${JSON.parse(wx.getStorageSync('art')).title}`,
        title: `${wx.getStorageSync('userinfo').nickName}`,
        path: `/pages/news/main?sharepath=games`,
        imageUrl: 'https://www.rrjiaoyi.com/app/games/zuiqiangyanli.jpg'
      }
    } else {
      return {
        title: `${JSON.parse(wx.getStorageSync('art')).title}`,
        // title: ``,
        path: `/pages/news/main?sharepath=games`,
        imageUrl: 'https://www.rrjiaoyi.com/img-pb/share-news.png'
      }
    }
}
}
</script>
<style lang='scss'>
.page {
  background-color: #333;
  color: white;
}

</style>
